﻿@model ITSTOREBLL.BaiViet

@{
    ViewBag.Title = "Sửa bài viết";
}
<script src="@Url.Content("~/Scripts/tinymce/tiny_mce.js")" type="text/javascript"></script>
<script src="@Url.Content("~/Scripts/tinymce/tiny_mce_popup.js")" type="text/javascript"></script>
<script src="@Url.Content("~/Scripts/tinymce/tiny_mce_src.js")" type="text/javascript"></script>
<script type="text/javascript">
    tinyMCE.init({
        mode: "textareas"
    });
</script>
<h2>Sửa bài viết</h2>

<script src="@Url.Content("~/Scripts/jquery.validate.min.js")" type="text/javascript"></script>
<script src="@Url.Content("~/Scripts/jquery.validate.unobtrusive.min.js")" type="text/javascript"></script>

@using (Html.BeginForm()) {
    @Html.ValidationSummary(true)
    <fieldset>
        <legend style="color:Blue">Thông tin bài viết</legend>
            @Html.HiddenFor(model => model.bv_ID)
        <div class="editor-label">
            Tiêu đề
        </div>
        <div class="editor-field">
            @Html.EditorFor(model => model.bv_TieuDe)
            @Html.ValidationMessageFor(model => model.bv_TieuDe)
        </div>

        Nội dung
        <div class="editor-field">
        @using (Html.BeginForm())
{
    <p>     
                <textarea name="content" cols="81" rows="15">@Html.DisplayTextFor(model => model.bv_NoiDung)</textarea>
    </p>
}
            @Html.ValidationMessageFor(model => model.bv_NoiDung)
        </div>
        Loại bài viết
        <div class="editor-field">
            @Html.DropDownList("bv_Loai", String.Empty)
            @Html.ValidationMessageFor(model => model.bv_Loai)
        </div>
        <br />
        <br />
        <p>
            <input type="submit" value="Lưu lại" />
        </p>
    </fieldset>
}

<div>
    @Html.ActionLink("Quay trở lại danh sách", "Index")
</div>
